<#macro datetimespinner 
	id=""
	name=""
	val=""  	value=""
	showSeconds = false
	canClear = true
	r=false		required=false
	p=""		prompt=""
	style="width:160px;"
	readonly=false
>
<#local options = "" >
	<#if val?string != "" || value?string != "">
		<#local options = options + ",value:'${val}${value}'" >
	</#if>
	<#if required || r>
		<#local options = options + ",required:true" >
	</#if>
	<#if prompt != "" || p!="">
		<#local options = options + ",prompt:'${prompt}${p}'" >
	</#if>
	<#if readonly>
		<#local options = options + ",readonly:true" >
	</#if>
	<#if showSeconds>
		<#local options = options + ",showSeconds:true" >
	</#if>
	<#if canClear>
		<#local options = options + ",icons:[{
				iconCls:'icon-clear',
				handler: function(e){
					$(e.data.target).datetimespinner('clear');
				}
			}]" >
	</#if>
<input <#if id != ""> id="${id}"</#if><#if name != ""> name="${name}"</#if> class="easyui-datetimespinner" <#if options != "">data-options="${options?substring(1)}"</#if><#if style != ""> style="${style}"</#if> />
</#macro>